package com.database.bean;

import java.util.Date;

import javax.persistence.AttributeOverride;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlRootElement;

@Entity
@Table(name="NEWS")
@AttributeOverride( name="id", column = @Column(name="id") )
@XmlRootElement
public class News extends BaseBean{
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	@Column(name="text")
	private String text=null;
	
	@Column(name="gameId")
	private Integer gameId=null;
	
	@Column(name="newsDate")
	private Date newsDate=null;
	
	@Column(name="header")
	private String header=null;

	public News(){
		super();
	}

	
	public News(String text,Integer gameId) {
		super();
		this.text=text;
		this.gameId=gameId;
	}


	public String getText() {
		return text;
	}


	public void setText(String text) {
		this.text = text;
	}

	public Integer getGameId() {
		return gameId;
	}


	public void setGameId(Integer gameId) {
		this.gameId = gameId;
	}

	/**
	 * @return the newsDate
	 */
	public Date getNewsDate() {
		return newsDate;
	}

	/**
	 * @param newsDate the newsDate to set
	 */
	public void setNewsDate(Date newsDate) {
		this.newsDate = newsDate;
	}

	/**
	 * @return the header
	 */
	public String getHeader() {
		return header;
	}

	/**
	 * @param header the header to set
	 */
	public void setHeader(String header) {
		this.header = header;
	}

	@Override
	public String toString() {
		return "News [text=" + text + ", gameId=" + gameId + ", newsDate="
				+ newsDate + ", header=" + header + "]";
	}
	
}
